package com.chinasofti.generic;

import java.util.ArrayList;

public class Type01 {
    public static void main(String[] args) {
        ArrayList<Integer> arrayList = new ArrayList<>();
        ArrayList<String> arrayList2 = new ArrayList<>();
        ArrayList<Number> arrayList3 = new ArrayList<>();
        ArrayList<Object> arrayList4 = new ArrayList<>();
        method(arrayList);
        method(arrayList2);
        method(arrayList3);
        method(arrayList4);
        getElement(arrayList);
//        getElement(arrayList2);
        getElement(arrayList3);
//        getElement(arrayList4);
//        getElement2(arrayList);
//        getElement2(arrayList2);
        getElement2(arrayList3);
        getElement2(arrayList4);


    }

    public static void method(ArrayList<?> list) {

    }
    public static void getElement(ArrayList<? extends Number>  list) {

    }
    public static void getElement2(ArrayList<? super Number>  list) {

    }

}
